package com.brush.system.domain.req.syspost;

import cn.hutool.core.util.StrUtil;
import com.brush.common.core.domain.page.PageAbstructReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;

/**
 * ClassName: SysPostReq
 * Package: com.brush.system.domain.req.syspost
 * Description:
 *
 * @Author luo
 * @Create 2024/8/25 15:35
 * @Version 1.0
 */
@Getter
@Setter
@ToString(callSuper = true)
@ApiModel(value = "SysPostReq", description = "岗位查询请求对象")
public class SysPostQueryReq extends PageAbstructReq {

    /**
     * 岗位编号
     */
    @ApiModelProperty(value = "岗位编号")
    private Long postId;
    /**
     * 岗位编码
     */
    @ApiModelProperty(value = "岗位编号")
    private String postCode;

    /**
     * 岗位名称
     */
    @ApiModelProperty(value = "岗位名称")
    private String postName;

    /**
     * 岗位排序
     */
    @ApiModelProperty(value = "岗位排序")
    private Integer postSort;

    /**
     * 岗位状态
     */
    @ApiModelProperty(value = "岗位状态")
    private String status;



    @ApiModelProperty(value = "开始时间")
    private Date beginTime;

    @ApiModelProperty(value = "结束时间")
    private Date endTime;


    /**
     * 排序
     *
     * @return
     */
    @ApiModelProperty(hidden = true)
    @Override
    public String getOrderBy() {
        if (StrUtil.isNotBlank(super.getOrderByColumn())) {
            return super.getOrderByColumn() + " " + super.getIsAsc();
        }
        return null;
    }
}
